home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / ggdebug.lha / test.c < prev    next >
C/C++ Source or Header  |  1999-03-11  |  717b  |  36 lines

  1. #include <proto/exec.h>
  2. #include <proto/ggdebug.h>
  3. #include <proto/dos.h>
  4.  
  5. struct Library *GGDebugBase;
  6.  
  7. void main(void)
  8. {
  9.     if(GGDebugBase=OpenLibrary("ggdebug.library",0L))
  10.     {
  11.         LONG args[3],i;
  12.  
  13.         PutStr("This small program tests ggdebug.library, you need\nsushi/sashimi or a serial terminal to see the output.\n");
  14.         KPrintf("KPrintf test: %s %s %ld %s\n","ciao", "come", 11, "va?");
  15.         KPutStr("KPutStr test...\n");
  16.  
  17.         args[0]=(LONG) "Ciao!";
  18.         args[1]=1234;
  19.         args[2]=NULL;
  20.  
  21.         VKPrintf("VKPrintf test: %s %ld\nKPutChar test: ",args);
  22.  
  23.         for(i=0;i<5;i++)
  24.         {
  25.             KPutChar('a'+i);
  26.         }
  27.  
  28.         KPutStr("\n");
  29.  
  30.         PutStr("Test completed.\n");
  31.  
  32.         CloseLibrary(GGDebugBase);
  33.     }
  34.     else PutStr("Unable to open the library!\n");
  35. }
  36.